package com.ats.developer.components.field
{
	import com.ats.developer.components.FormItem;
	import com.ats.developer.components.borderpint.BBorderPoint;
	import com.ats.developer.components.borderpint.BRBorderPoint;
	import com.ats.developer.components.borderpint.LBBorderPoint;
	import com.ats.developer.components.borderpint.LBorderPoint;
	import com.ats.developer.components.borderpint.RBorderPoint;
	import com.ats.developer.components.borderpint.TBorderPoint;
	import com.ats.developer.components.borderpint.TLBorderPoint;
	import com.ats.developer.components.borderpint.TRBorderPoint;
	
	import mx.controls.Image;
	import mx.controls.Label;
	import mx.controls.Text;
	import mx.controls.TextArea;
	import mx.events.FlexEvent;
	import mx.utils.UIDUtil;
	
	public class ATSLabel extends FormItem
	{
		[ Bindable]
		[Embed(source="assets/img/imglist/Txt.png")]
		public var labelicon:Class;
		public var tb:TBorderPoint=new TBorderPoint(0,0);
		public var bb:BBorderPoint=new BBorderPoint(0,0);
		public var rb:RBorderPoint=new RBorderPoint(0,0);
		public var lb:LBorderPoint=new LBorderPoint(0,0);
		public var tlb:TLBorderPoint=new TLBorderPoint(0,0);
		public var lbb:LBBorderPoint=new LBBorderPoint(0,0);
		public var trb:TRBorderPoint=new TRBorderPoint(0,0);
		public var brb:BRBorderPoint=new BRBorderPoint(0,0);
		public var atsLabel:TextArea=new TextArea();
		public var img:Image=new Image();
		
		public function ATSLabel()
		{
			super();
			_productUUID=UIDUtil.createUID();
		}
		
		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
			super.updateDisplayList(unscaledWidth,unscaledHeight);
			rb.update(unscaledWidth,unscaledHeight);
			lb.update(unscaledWidth,unscaledHeight);
			tb.update(unscaledWidth,unscaledHeight);
			bb.update(unscaledWidth,unscaledHeight);
			tlb.update(unscaledWidth,unscaledHeight);
			lbb.update(unscaledWidth,unscaledHeight);
			trb.update(unscaledWidth,unscaledHeight);
			brb.update(unscaledWidth,unscaledHeight);
			atsLabel.width=unscaledWidth;
			atsLabel.height=unscaledHeight;
		}
		override protected function createChildren():void{
			super.createChildren();
			atsLabel.wordWrap=true;
			img.source=labelicon;
			atsLabel.setStyle("borderStyle","none");
			atsLabel.setStyle("backgroundAlpha","0");
			atsLabel.setStyle("fontSize","20");
			atsLabel.text="请输入文本....";
			atsLabel.height=70;
			atsLabel.width=80;
			this.add(atsLabel);
			this.add(rb);
			this.add(lb);
			this.add(tb);
			this.add(bb);
			this.add(tlb);
			this.add(lbb);
			this.add(trb);
			this.add(brb);
		}
			
	}
}